<script>
import store from './store/index.js';

export default {
	onLaunch: function() {
		console.log('App Launch');
		
		// 获取系统信息
		const systemInfo = uni.getSystemInfoSync();
		store.state.systemInfo = systemInfo;
		
		// 检查登录状态
		if (store.getters['user/isLoggedIn']) {
			store.dispatch('user/getUserInfo');
		}
	},
	onShow: function() {
		console.log('App Show');
	},
	onHide: function() {
		console.log('App Hide');
	}
};
</script>

<style lang="scss">
@import './styles/index.scss';
</style>
